package com.ss.android.article.base.feature.detail2.picgroup;

import android.view.View;

import com.ss.android.article.base.app.AppData;
import com.ss.android.article.base.feature.detail2.view.NewDetailActivity;
import com.ss.android.article.base.feature.model.Article;
import com.ss.android.article.share.e.b;
import com.ss.android.common.callback.CallbackCenter;
import com.ss.android.model.BaseArticle;
import com.ss.android.model.AbsArticle;

final class s implements b {
    private final GalleryFragment a;

    s(GalleryFragment arg1) {
        this.a = arg1;

    }

    public final boolean a(com.ss.android.article.share.entity.a arg7, View arg8, com.ss.android.article.share.c.a arg9) {
        boolean v1 = true;
        boolean v2 = false;
        if (arg7 != null) {
            switch (arg7.e) {
                case 1: {
                    ((NewDetailActivity) this.a.getActivity()).saveShareWay(1);
                    return false;
                }
                case 2: {
                    ((NewDetailActivity) this.a.getActivity()).saveShareWay(2);
                    return false;
                }
                case 3:
                case 4: {
                    ((NewDetailActivity) this.a.getActivity()).saveShareWay(3);
                    return false;
                }
                case 12: {
                    this.a.d("pgc_button");
                    return false;
                }
                case 13: {
                    Article v2_1 = this.a.c;
                    if (v2_1 == null) {
                        return v1;
                    }
                    GalleryFragment v3 = this.a;
                    String v0_2 = v2_1.userRepin ? "unfavorite_button" : "favorite_button";
                    v3.a(v0_2, ((BaseArticle) v2_1));
                    this.a.s();
                    return v1;
                }
                case 14: {
                    int v0_1 = !AppData.isNightMode() ? 1 : 0;
                    this.a.d.aE();
                    CallbackCenter.notifyCallback(com.ss.android.j.b.callbackTypeNightModeChanged, new Object[0]);
                    GalleryFragment v2_2 = this.a;
                    String v0_2 = v0_1 != 0 ? "click_to_night" : "click_to_day";
                    v2_2.d(v0_2);
                    if (arg9 == null) {
                        return v1;
                    }
                    arg9.f();
                    arg9.e();
                    return v1;
                }
                case 15: {
                    this.a.c("display_setting");
                    return false;
                }
                case 16: {
                    GalleryFragment v0 = this.a;
                    if (v0.c != null) {
                        v0.d("report_button");
                        Article v2_1 = v0.c;
                        if (v0.l != null) {
                            v0.l.a(((AbsArticle) v2_1), v0.a);
                            return v1;
                        } else {
                            return v1;
                        }
                    } else {
                        return v1;
                    }
                }
            }
            return false;

        }

        return v2;
    }
}

